{% extends "staff/base.html" %}
{% import 'staff/_formhelpers.html' as forms %}

{% block title %} {{ version.name }} Version {% endblock %}

{% block main %}
  <section class="content-header">
      <h1>
        {{ version.name }} Version
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-desktop"></i> Client Version</a></li>
      </ol>
  </section>

  <section class="content">
    {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
            {% for category, message in messages %}
                <div class="alert alert-{{ category }} alert-dismissible">
                  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                  {{message}}
                </div>
            {% endfor %}
        {% endif %}
    {% endwith %}

      <div class="col-md-12 col-xs-12">
        <!-- Default box -->
        <!--  Box -->
        <div class="box">
          <div class="box-header with-border">
            <h3 class="box-title">Update {{ version.name }}</h3>
          </div>
          <div class="box-body">
              {% call forms.render_form(form, action_url="", action_text='Update Client Version',
                                          class_='form') %}
                  {{ forms.render_field(form.current_version, label_visible=true, placeholder='v1.5.4', type='text') }}
                  {{ forms.render_field(form.download_link, label_visible=true, placeholder='https://github.com/okpy/ok-client/releases/download/v1.5.4/ok', type='text') }}
              {% endcall %}
          </div>
          <!-- /.box-body -->
          <!-- /.box-footer-->


      </div>
    </div>

  </section>


  <!-- </body> do not close body in template-->
{% endblock %}
